CC = clang
AR = llvm-ar

SRC = ${wildcard *.c}
OBJS = ${patsubst %.c, %.o, $(SRC)}
CFLAGS = -g -Wall -O2
LIBS = -lpthread -lcjson

main: $(OBJS)
	$(CC) $(CFLAGS) $^ -o $@ $(LIBS)

$(OBJS): %.o: %.c
	$(CC) $(CFLAGS) -c $^ -o $@

clean:
	-rm -rf *.o
